import request from '~/utils/resquest'

//  井盖警报-列表
export const manholeAlarmListGet = <T>(params: T) => {
  return request({
    url: '/api/gxsaas-monitor/device/manholeAlarm/list',
    method: 'GET',
    params
  })
}

//  井盖警报-忽略
export const manholeAlarmIgnoreAlarmGet = <T>(params: T) => {
  return request({
    url: '/api/gxsaas-monitor/device/manholeAlarm/ignoreAlarm',
    method: 'POST',
    params
  })
}

//  井盖警报-推送
export const manholeAlarmPushOrderGet = <T>(params: T) => {
  return request({
    url: '/api/gxsaas-monitor/device/manholeAlarm/pushOrder',
    method: 'POST',
    params
  })
}

//  井盖警报-配置
export const manholeAlarmConfigGet = <T>(params: T) => {
  return request({
    url: '/api/gxsaas-monitor/device/manholeAlarmConfig/listPage',
    method: 'GET',
    params
  })
}

//  井盖警报-配置-修改
export const manholeAlarmConfigUpdateGet = <T>(data: T) => {
  return request({
    url: '/api/gxsaas-monitor/device/manholeAlarmConfig/update',
    method: 'POST',
    data
  })
}

//  井盖设备-列表
export const manholeListGet = <T>(params: T) => {
  return request({
    url: '/api/gxsaas-monitor/device/manhole/list',
    method: 'GET',
    params
  })
}

// 井盖设备-导出
export const manholeExport = <T>(payload: T) =>
  request({
    url: '/api/gxsaas-monitor/device/manhole/export',
    method: 'get',
    responseType: 'blob',
    ...payload
  })

// 井盖设备-导入
export const manholeImportExcelGet = <T>(params: T) =>
  request({
    url: '/api/gxsaas-monitor/device/manhole/import-excel',
    method: 'post',
    data: params
  })

//  井盖设备-删除
export const manholeRemovePost = <T>(params: T) => {
  return request({ url: '/api/gxsaas-monitor/device/manhole/remove', method: 'POST', params })
}

//  井盖设备-详情
export const manholeViewGet = <T>(params: T) => {
  return request({
    url: '/api/gxsaas-monitor/device/manhole/view',
    method: 'GET',
    params
  })
}

//  井盖设备-修改
export const manholeUpdatePost = <T>(data: T) => {
  return request({
    url: '/api/gxsaas-monitor/device/manhole/update',
    method: 'POST',
    data
  })
}

//  井盖设备-新增
export const manholeSavePost = <T>(data: T) => {
  return request({
    url: '/api/gxsaas-monitor/device/manhole/save',
    method: 'POST',
    data
  })
}

//  井盖警报-同步资产库
export const manholeSyncAssetManholeGet = <T>(params: T) => {
  return request({
    url: '/api/gxsaas-monitor/device/manhole/syncAssetManhole',
    method: 'POST',
    params
  })
}

//  井盖-树
export const manholeMapGetManholeTreeListGet = <T>(params: T) => {
  return request({
    url: '/api/gxsaas-monitor/device/manholeMap/getManholeTreeList',
    method: 'GET',
    params
  })
}

//  井盖-点位
export const manholeMapGetManholePointAllGet = <T>(params: T) => {
  return request({
    url: '/api/gxsaas-monitor/device/manholeMap/getManholePointAll',
    method: 'GET',
    params
  })
}

//  井盖-设备状态统计
export const manholeMapGetDeviceStateNumGet = <T>(params: T) => {
  return request({
    url: '/api/gxsaas-monitor/device/manholeMap/getDeviceStateNum',
    method: 'GET',
    params
  })
}

//  井盖-井盖设备列表
export const manholeMapGetDeviceListGet = <T>(params: T) => {
  return request({
    url: '/api/gxsaas-monitor/device/manholeMap/getDeviceList',
    method: 'GET',
    params
  })
}

//  井盖-设备故障列表
export const manholeMapGetDeviceAlarmGet = <T>(params: T) => {
  return request({
    url: '/api/gxsaas-monitor/device/manholeMap/getDeviceAlarm',
    method: 'GET',
    params
  })
}

//  井盖-设备信息
export const manholeMapGetDeviceInfoGet = <T>(params: T) => {
  return request({
    url: '/api/gxsaas-monitor/device/manholeMap/getDeviceInfo',
    method: 'GET',
    params
  })
}

//  井盖-设备工况列表
export const manholeWorkListGet = <T>(params: T) => {
  return request({
    url: '/api/gxsaas-monitor/device/manholeWork/list',
    method: 'GET',
    params
  })
}
